package com.sunpeng.mybatis.endpoint;

import com.sunpeng.mybatis.entity.Student;
import com.sunpeng.mybatis.mapper.StudentMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author sunpeng
 * @Date 2021-01-07 16:37
 */
@RestController
public class StudentEndpoint {

    @Autowired
    StudentMapper studentMapper;

    @GetMapping("/hello")
    public String hello(Long id){
        System.out.println(studentMapper.selectById(id));
        return "success";
    }
}
